package com.knight.study.patterns.tujie.decorator;

/**
 * @Author knight
 * @Date 2024/9/11 16:00
 */

public class DecoratorMains {
    public static void main(String[] args) {
        Display b1 = new StringDisplay("Hello,word.");
        Display b2 = new SideBorder(b1, '#');
        Display b3 = new FullBorder(b2);
        b1.show();
        b2.show();
        b3.show();
        Display b4= new SideBorder(
                new FullBorder(
                        new SideBorder(
                                new FullBorder(
                                        new StringDisplay("hello,world.")
                                ),
                                '*'
                        )
                ),
                '/'
        );
        b4.show();
    }
}
